﻿// ******************************************************************
// * Copyright(c)  Steven Lu
// * Description   : Entity_PROD_COST_COEFFICIENT
// * CreateDate    : 2011-11-11 15:59:20
// * Creater       : CodeSmith
// * LastChangeDate: 2011-11-11 15:59:20
// * LastChanger   : 2011-11-11 15:59:20
// * Version Info  : 1.0 For ESOL
// ******************************************************************

using System;
using System.Data;
using System.Collections.Generic;
using System.Text;
using Suzsoft.Smart.EntityCore;

using ESOL.Common.Schema;

namespace ESOL.Common.Entity
{
    [Serializable]
    public partial class ProdCostCoefficientEntity : EntityBase
    {
        public ProdCostCoefficientTable TableSchema
        {
            get
            {
                return ProdCostCoefficientTable.Current;
            }
        }

        public ProdCostCoefficientEntity()
        {

        }

        public ProdCostCoefficientEntity(DataRow dr)
        {
            if (dr == null)
            {
                return;
            }
            this.CostCofficientId = Convert.ToString(CommonFunctions.ToObject(dr["COST_COFFICIENT_ID"]));
            this.ProductId = Convert.ToString(CommonFunctions.ToObject(dr["PRODUCT_ID"]));
            this.CostCofficient = Convert.ToDecimal(CommonFunctions.ToObject(dr["COST_COFFICIENT"]));
            this.CreateDate = Convert.ToDateTime(CommonFunctions.ToObject(dr["CREATE_DATE"]));
            this.CreateBy = Convert.ToString(CommonFunctions.ToObject(dr["CREATE_BY"]));
            this.ApprovedDate = Convert.ToDateTime(CommonFunctions.ToObject(dr["APPROVED_DATE"]));
            this.ApprovedBy = Convert.ToString(CommonFunctions.ToObject(dr["APPROVED_BY"]));
            this.Remark = Convert.ToString(CommonFunctions.ToObject(dr["REMARK"]));
            this.Status = Convert.ToString(CommonFunctions.ToObject(dr["STATUS"]));
        }

        public ProdCostCoefficientEntity(DataRowView dr)
        {
            if (dr == null)
            {
                return;
            }
            this.CostCofficientId = Convert.ToString(CommonFunctions.ToObject(dr["COST_COFFICIENT_ID"]));
            this.ProductId = Convert.ToString(CommonFunctions.ToObject(dr["PRODUCT_ID"]));
            this.CostCofficient = Convert.ToDecimal(CommonFunctions.ToObject(dr["COST_COFFICIENT"]));
            this.CreateDate = Convert.ToDateTime(CommonFunctions.ToObject(dr["CREATE_DATE"]));
            this.CreateBy = Convert.ToString(CommonFunctions.ToObject(dr["CREATE_BY"]));
            this.ApprovedDate = Convert.ToDateTime(CommonFunctions.ToObject(dr["APPROVED_DATE"]));
            this.ApprovedBy = Convert.ToString(CommonFunctions.ToObject(dr["APPROVED_BY"]));
            this.Remark = Convert.ToString(CommonFunctions.ToObject(dr["REMARK"]));
            this.Status = Convert.ToString(CommonFunctions.ToObject(dr["STATUS"]));
        }

        public override TableInfo OringTableSchema
        {
            get
            {
                return ProdCostCoefficientTable.Current;
            }
        }

        #region Perporty List
        public string CostCofficientId
        {
            get { return Convert.ToString(GetData(ProdCostCoefficientTable.C_COST_COFFICIENT_ID)); }
            set { SetData(ProdCostCoefficientTable.C_COST_COFFICIENT_ID, value); }
        }

        public string ProductId
        {
            get { return Convert.ToString(GetData(ProdCostCoefficientTable.C_PRODUCT_ID)); }
            set { SetData(ProdCostCoefficientTable.C_PRODUCT_ID, value); }
        }

        public decimal CostCofficient
        {
            get { return Convert.ToDecimal(GetData(ProdCostCoefficientTable.C_COST_COFFICIENT)); }
            set { SetData(ProdCostCoefficientTable.C_COST_COFFICIENT, value); }
        }

        public DateTime CreateDate
        {
            get { return Convert.ToDateTime(GetData(ProdCostCoefficientTable.C_CREATE_DATE)); }
            set { SetData(ProdCostCoefficientTable.C_CREATE_DATE, value); }
        }

        public string CreateBy
        {
            get { return Convert.ToString(GetData(ProdCostCoefficientTable.C_CREATE_BY)); }
            set { SetData(ProdCostCoefficientTable.C_CREATE_BY, value); }
        }

        public DateTime ApprovedDate
        {
            get { return Convert.ToDateTime(GetData(ProdCostCoefficientTable.C_APPROVED_DATE)); }
            set { SetData(ProdCostCoefficientTable.C_APPROVED_DATE, value); }
        }

        public string ApprovedBy
        {
            get { return Convert.ToString(GetData(ProdCostCoefficientTable.C_APPROVED_BY)); }
            set { SetData(ProdCostCoefficientTable.C_APPROVED_BY, value); }
        }

        public string Remark
        {
            get { return Convert.ToString(GetData(ProdCostCoefficientTable.C_REMARK)); }
            set { SetData(ProdCostCoefficientTable.C_REMARK, value); }
        }

        public string Status
        {
            get { return Convert.ToString(GetData(ProdCostCoefficientTable.C_STATUS)); }
            set { SetData(ProdCostCoefficientTable.C_STATUS, value); }
        }

        #endregion
    }


}

